<template>
    <div>
        <div class="mui-input-row">
            <label>号码归属地查询</label>
            <input type="text" class="mui-input-clear" placeholder="带清除按钮的输入框" v-model="number">
        </div>
        <mt-button type="primary" @click="getlunbotu" size="large">查询</mt-button>
        <p>{{message.carrier}}</p>
    </div>
</template>
<script>
    export default {
        data(){
            return {

                number:'',
                url:'http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel',
                message:''
            }
        },
        // created(){
        //     this.getlunbotu();
        // },
        methods:{
            getlunbotu(){
                this.$http.jsonp(this.url+'='+this.number).then(result=>{
                    console.log(result.body)
                    return this.message = result.body;
                })
            }
        }
    }
</script>
<style scoped>
</style>